/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package be.ac.ua.comp.projectGPT.BiddingPolicies;

/**
 * Implementation for a bidding policy on which the auctioneer depends.
 * The bid will be accepted when it is sufficiently higher than the current highest bid.
 */
public class IntervalPolicy extends BiddingPolicy {
    
    long interval;

    public IntervalPolicy(long interval) {
        this.interval = interval;
    }
    
    public boolean accept(long bid,long previous) {
        return (bid+interval > auctioneer.getHighestBid());
    }

    @Override
    public long getSuggestion(long previousBid) {
        return previousBid + interval;
    }

}
